From: Florian Müllner Date: Tue, 10 Mar 2015 22:36:09 +0000 (+0100) Subject: calendar: Filter out newlines when unexpanded X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~1527 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=b18240370d3ed7159e217197f01b0e06b8030946;p=gnome-shell.git calendar: Filter out newlines when unexpanded Enabling line-wrapping of the unexpanded body is not enough to enforce a single line when the text has embedded newlines, so replace these with spaces (this is similar to setting ClutterText:single-line-mode, however that would use a paragraph separator glyph instead). --- diff --git a/js/ui/calendar.js b/js/ui/calendar.js index 22c0c2c13..19d154ad2 100644 --- a/js/ui/calendar.js +++ b/js/ui/calendar.js @@ -1044,7 +1044,7 @@ const Message = new Lang.Class({ setBody: function(text) { this._bodyText = text; - this.bodyLabel.setMarkup(text, this._useBodyMarkup); + this.bodyLabel.setMarkup(text.replace(/\n/g, ' '), this._useBodyMarkup); }, setUseBodyMarkup: function(enable) {